package com.evil.kingdom.pojo.entity.base;

import cn.hutool.core.collection.ListUtil;

/**
 * 攻防名称
 *
 * @author liyang
 * @date 2024-06-12 14:41
 */
public interface SideName {

    String getOffensiveName();

    String getDefensiveName();

    default boolean implicate(SideName sideName) {
        return ListUtil.toList(this.getOffensiveName(), this.getDefensiveName()).containsAll(ListUtil.toList(sideName.getOffensiveName(), sideName.getDefensiveName()));
    }

    default boolean implicate(String marshalName) {
        return ListUtil.toList(this.getOffensiveName(), this.getDefensiveName()).contains(marshalName);
    }

    default String printInfo() {
        return String.format("offensiveName:%s, defensiveName:%s", this.getOffensiveName(), this.getDefensiveName());
    }
}
